package com.zengfa.task.client.vo;

import java.util.HashMap;
import java.util.Map;

import org.springframework.context.ApplicationContext;

import com.zengfa.task.api.model.JobNodeDTO;

import lombok.Data;

@Data
public class JobContextVo {

	private String jobId;
	
	private String bizId;
	
	private JobNodeDTO currentNode;
	
	private Map<String,Object> dataMap;
	
	private ApplicationContext applicationContext;
//	private User user;
	
	public void putData(String name,Object data) {
		if(dataMap == null) {
			dataMap = new HashMap<>();
		}
		dataMap.put(name, data);
	}
	
	public Object getData(String name) {
		if(dataMap == null) {
			return null;
		}
		return dataMap.get(name);
	}
	
	
}
